package cn.iocoder.yudao.module.book.controller.app.classes.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "用户 App - 班级详情 Response VO")
@Data
public class AppClassDetailRespVO {

    @Schema(description = "班级基本信息")
    private ClassInfo classInfo;

    @Schema(description = "班级成员列表")
    private List<ClassMember> members;

    @Schema(description = "班级作业列表")
    private List<ClassHomework> homeworks;

    @Schema(description = "班级打卡列表")
    private List<ClassCheckin> checkins;

    @Schema(description = "班级基本信息")
    @Data
    public static class ClassInfo {
        @Schema(description = "班级ID")
        private Integer classesId;

        @Schema(description = "班级名称")
        private String cname;

        @Schema(description = "老师ID")
        private Long userId;

        @Schema(description = "老师姓名")
        private String teacherName;

        @Schema(description = "班级指令")
        private Integer command;

        @Schema(description = "成员数量")
        private Integer memberCount;

        @Schema(description = "创建时间")
        private LocalDateTime createTime;

        @Schema(description = "当前用户是否为老师")
        private Boolean isTeacher;
    }

    @Schema(description = "班级成员")
    @Data
    public static class ClassMember {
        @Schema(description = "成员ID")
        private Integer membersId;

        @Schema(description = "用户ID")
        private Long userId;

        @Schema(description = "用户昵称")
        private String nickname;

        @Schema(description = "用户头像")
        private String avatar;

        @Schema(description = "是否为老师")
        private Boolean isTeacher;

        @Schema(description = "加入时间")
        private LocalDateTime joinTime;
    }

    @Schema(description = "班级作业")
    @Data
    public static class ClassHomework {
        @Schema(description = "作业ID")
        private Integer homeworkId;

        @Schema(description = "作业标题")
        private String title;

        @Schema(description = "作业描述")
        private String description;

        @Schema(description = "作业要求")
        private String requirement;

        @Schema(description = "截止时间")
        private LocalDateTime deadline;

        @Schema(description = "创建时间")
        private LocalDateTime createTime;

        @Schema(description = "完成状态")
        private Integer status; // 0-未完成 1-已完成

        @Schema(description = "完成人数")
        private Integer completedCount;
    }

    @Schema(description = "班级打卡")
    @Data
    public static class ClassCheckin {
        @Schema(description = "打卡ID")
        private Integer checkinId;

        @Schema(description = "打卡标题")
        private String title;

        @Schema(description = "打卡要求")
        private String requirement;

        @Schema(description = "打卡日期")
        private LocalDateTime checkinDate;

        @Schema(description = "创建时间")
        private LocalDateTime createTime;

        @Schema(description = "打卡状态")
        private Integer status; // 0-未打卡 1-已打卡

        @Schema(description = "打卡人数")
        private Integer checkinCount;
    }
}